<?php

class AboutController extends Controller {
    public $layout = '//layouts/aboutmain';
    public $s;
    public $title;


    public function filters() {
        return array(
            'accessControl', // perform access control for CRUD operations
        );
    }

    public function accessRules() {
        return array(
            array('allow', // allow authenticated users to access all actions
                'users' => array('*'),
            ),
        );
    }

    public function init() {
        $this->s = $_GET['s'] ? $_GET['s'] : 'company';
        $cs = Yii::app()->clientScript;
        $cs->registerCssFile(Yii::app()->baseUrl . '/css/common.css');
		$cs->registerCssFile(Yii::app()->baseUrl . '/css/v3/n_common.css');
        $cs->registerCssFile(Yii::app()->baseUrl . '/css/about.css');
        $cs->registerScriptFile(Yii::app()->request->baseUrl . "/js/common.js", CClientScript::POS_HEAD);
		$cs->registerScriptFile(Yii::app()->request->baseUrl . "/js/v3/n_common.js", CClientScript::POS_HEAD);
        $cs->registerCoreScript('jquery');
        $cs->registerCoreScript('jquery.ui');
    }

    public function actions() {
        return array(
            'captcha' => array(
                'class' => 'CCaptchaAction',
                'backColor' => 0xFFFFFF,
            ),
            'page' => array(
                'class' => 'CViewAction',
            ),
        );
    }

    public function actionIndex() {
        $this->pageTitle = '关于我们';
        
        $this->render($this->s);
    }
}

?>